<script src="/assets/js/charts/highcharts.js"></script>
<script src="/assets/js/charts/highcharts-more.js"></script>
<script src="/assets/js/charts/modules/exporting.js"></script>
<SCRIPT type="text/javascript">
		var setting = {
		data: {
			simpleData: {
				enable: true
			}
		},
		callback: {
			//onCollapse: alert("up"),
			onExpand: function(){
				if (treeNiceScroll) {
					treeNiceScroll.resize();
				}
			},
			onClick: zTreeOnClick
	
		},
		view: {
			showLine: false
		}
	};
	function zTreeOnClick(event, treeId, treeNode) {
		$("#beginNumShow").val(1);
		$("#endNumShow").val(20);
    	$("#searchForm").attr("action",treeNode.value);
    	submitSearchForm("current");
	};
	var zNodes1 =[
		{ id:"event", pId:0, name:"事件", open:true, icon:"/assets/images/system-search-2.png", value:"/${orgi}/manage/serviceplan/serverevent/${server.id!''}.html"},
		{ id:"log", pId:0, name:"日志", open:true, icon:"/assets/images/LogIco.png", value:"/${orgi}/manage/serviceplan/serverlog/${server.id!''}.html"},
		{ id:"cpu", pId:0, name:"CPU", open:true, icon:"/assets/images/cpu.png", value:"/${orgi}/manage/serviceplan/serverresource/cpu/${server.id!''}.html"},
		{ id:"memory", pId:0, name:"内存", open:true, icon:"/assets/images/memory.png", value:"/${orgi}/manage/serviceplan/serverresource/memory/${server.id!''}.html"},
		{ id:"disk", pId:0, name:"硬盘", open:true, icon:"/assets/images/drive-harddisk-3.png", value:"/${orgi}/manage/serviceplan/serverresource/disk/${server.id!''}.html"},
		{ id:"net", pId:0, name:"网络", open:true, icon:"/assets/images/network-wireless-transmit_blue.png", value:"/${orgi}/manage/serviceplan/serverresource/net/${server.id!''}.html"},
		{ id:"jvm", pId:0, name:"虚拟机", open:true, icon:"/assets/images/video-television-3.png", value:"/${orgi}/manage/serviceplan/serverresource/jvm/${server.id!''}.html"}
		
	];
	function submitSearchForm(action){
		$("#beginNum").val($("#beginNumShow").val());
		$("#endNum").val($("#endNumShow").val());

		if($("#beginNumShow").length!=0){
			var reg = /^[0-9]*$/;
			if(reg.test($("#beginNum").val())&&reg.test($("#endNum").val())&&(parseInt($("#endNum").val())>=parseInt($("#beginNum").val()))){
				$("#action").val(action);
				$("#searchForm").submit();
			}else{
				alertMsg("请输入正确的页码信息！");
			}
		}else{
			$("#action").val(action);
			$("#searchForm").submit();
		}
		
	}
		
	function timeEnable(){
		
		if($("input[name='timeType']:checked").val()==1){
			$("#beginTime").attr("disabled",true);
			$("#endTime").attr("disabled",true);
			$("#times").attr("disabled",false);
		}else{
			$("#beginTime").attr("disabled",false);
			$("#endTime").attr("disabled",false);
			$("#times").attr("disabled",true);
		}
	}



	window.onload=window.onresize=function(){
		  resizeServicePanel();
	}
	function resizeServicePanel(){
		var winHeight = $(window).height() , winWidth = $(window).width();
		var isNotIE=-[-1,];
		if(isNotIE)
		{
			 scrollHeight = document.body.scrollHeight;//非IE浏览器
		}
		else
		{
			 scrollHeight = document.documentElement.scrollHeight;//IE浏览器
		}
		$('#filterList').height(scrollHeight - 130- 173);
		$('#olap').height(scrollHeight - 118 - 240 - 200);
		$('#right_mon_panel').height(scrollHeight - 130);

	}
</SCRIPT>
